//
//  Start_Dev_in_SwiftTests.swift
//  Start Dev in SwiftTests
//
//  Created by ficow on 16/8/16.
//  Copyright © 2016年 ficow. All rights reserved.
//

import XCTest
@testable import Start_Dev_in_Swift

class Start_Dev_in_SwiftTests: XCTestCase {
    
    // MARK: FOODTRACKER TESTS
    func testMealInitialization(){
        
        //Success case
        let potentialItem = Meal(name:"Newest meal",photo:nil,rating:5)
        XCTAssertNotNil(potentialItem)
        
        //Failure case
        let noName = Meal(name: "", photo: nil, rating: 0)
        XCTAssertNil(noName,"Empty name is invalid")
        
        let badRating = Meal(name: "Really bad rating", photo: nil, rating: -1)
        XCTAssertNil(badRating,"Negative ratings are invalid, be positive")
    }
    
}
